package com.carlinfo.stu_ques.question.pojo;

import java.util.Date;

import java.io.Serializable;
import java.util.Date;

/**
 * 问题
 * 属性:id,名字,得分,回答总人数,创建时间,结束时间
 * @author wll
 */
public class Question implements Serializable
{
	private int id;
	private String name;
	private int score;
	private int people;
	private Date createTime;
	private Date endTime;
	
	public int getId()
	{
		return id;
	}
	public void setId(int id)
	{
		this.id = id;
	}
	public String getName()
	{
		return name;
	}
	public void setName(String name)
	{
		this.name = name;
	}
	public Date getCreateTime()
	{
		return createTime;
	}
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	public Date getEndTime()
	{
		return endTime;
	}
	public void setEndTime(Date endTime)
	{
		this.endTime = endTime;
	}
	public String toString()
	{
		String name = null;
		if(getName().length()>3) {
			name = getName().substring(0,3)+"...";
		}
		String result = getId() +"\t" + name+"\t"+getScore() + "\t"+getPeople()
		+"\t"+getCreateTime().toLocaleString()+"\t"+getEndTime().toLocaleString();
		return result;
		
	}
	public int getScore()
	{
		return score;
	}
	public void setScore(int score)
	{
		this.score = score;
	}
	public int getPeople()
	{
		return people;
	}
	public void setPeople(int people)
	{
		this.people = people;
	}
}

